Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Search][A11Y] Playground -> Open AI form #202071

Merged

Conversation

Samiul-TheSoccerFan
Copy link
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan commented Nov 27, 2024

Summary

refers #195048 (comment)

The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as There are some errors in the form. When using a screen reader, this message will indicate that the form submission failed due to errors.

Each individual field will then be responsible for displaying its own specific error messages.

This approach ensures compliance with A11Y standards.

PR Screen Record

Add

Add-connector-form.mov

Edit

edit.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@Samiul-TheSoccerFan Samiul-TheSoccerFan added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Search v8.17.0 a11y Accessibility issue v8.18.0 v8.16.2 labels Nov 27, 2024
@Samiul-TheSoccerFan Samiul-TheSoccerFan marked this pull request as ready for review November 29, 2024 00:59
@Samiul-TheSoccerFan Samiul-TheSoccerFan requested a review from a team as a code owner November 29, 2024 00:59
@Samiul-TheSoccerFan Samiul-TheSoccerFan added the backport:version Backport to applied version labels label Nov 29, 2024
@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a danger callout so it's more visible:
CleanShot 2024-12-02 at 12 09 48@2x

<EuiCallout size="s" color="danger" iconType="warning" title="All fields are required" />

Still need the spacer after this.

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the update! LGTM

@Samiul-TheSoccerFan Samiul-TheSoccerFan added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Dec 3, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@@ -159,6 +168,11 @@ const CreateConnectorFlyoutComponent: React.FC<CreateConnectorFlyoutProps> = ({

const createdConnector = await createConnector(validConnector);
return createdConnector;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a form has only required fields (no optional fields)

Having the code here will not meet this requirement. As is the message is triggered whenever the form is not valid.

We should not display a message saying all fields are required when some are optional.

Screenshot 2024-12-04 at 10 36 09

This change will affect all connectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I restrict this change only to gen AI connectors that we use in playground as most of these have required fields, or should all connectors have the same behavior?

cc: @mdefazio

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adcoelho What if we make the message more generic?

"There are required fields missing" or "Some fields are not valid"

Ideally we will have some message at the top letting the user know there are errors in the form. (which I think is the point of the PR?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"

These would imo make more sense but I am also trying to be cautious here about a UI change that would affect all connectors. We didn't discuss it internally and weren't aware. But it doesn't seem like a big deal, I'll bring it up in our sync(today).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"

These would imo make more sense but I am also trying to be cautious here about a UI change that would affect all connectors. We didn't discuss it internally and weren't aware. But it doesn't seem like a big deal, I'll bring it up in our sync(today).

Thank you @adcoelho. Please keep us informed about the team's decision.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, getting back to this @mdefazio

What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"

Won't your suggestion then go against the original comment from @MichaelMarcialis that originated this task and where he explicitly says:

If the form has one or more optional fields, no additional affordance is necessary, beyond marking the optional fields.

?

This change only seems to make sense if it applies to connectors where all fields are required and if not we should leave things as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general idea is that if there are any errors in the form, a header should appear at the top with a message like, There are some errors while submitting. Individual fields or actions can then display their specific error messages for more details. However, I'll let @mdefazio confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct—this is about errors in the form. We removed the message "All fields required" that appears initially prior to submission since this wouldn't make sense for all Connector forms.

Related, the original comment is around noting which fields are required, prior to form submission, not about error handling.

If i'm not mistaken, the benefit of this additional callout, is to indicate that there are errors in the form, which may be out of view initially, and provide a landmark and message to screen readers.

If we make this message generic, meaning simply "There are fields with errors.", or "Some fields were not valid", etc., it allows us to show this regardless if all fields are required or not—so for every connector type form.

Someone can correct me on the need and benefit of this, but that is my understanding. I acknowledge that the Connector framework is unique based on the dynamic nature of the forms, so this is a tricky one to start off with for this pattern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, my comment wasn't saying that an error callout such a this can't be shown on form submission. I was just stating that a simple note stating that "All items are required" (shown before form submission) isn't to be used on a form that has one or more optional elements. If ya'll feel this form is lengthy, with some elements with validation errors falling out of view, and could benefit from the inclusion of an additional callout indicating errors, I'll leave that to your discretion.

Comment on lines 475 to 500
it('show Required all fields message', async () => {
const { getByTestId } = appMockRenderer.render(
<CreateConnectorFlyout
actionTypeRegistry={actionTypeRegistry}
onClose={onClose}
onConnectorCreated={onConnectorCreated}
onTestConnector={onTestConnector}
/>
);
await act(() => Promise.resolve());

await userEvent.click(getByTestId(`${actionTypeModel.id}-card`));

await waitFor(() => {
expect(getByTestId('test-connector-text-field')).toBeInTheDocument();
});

await userEvent.type(getByTestId('test-connector-text-field'), 'My text field', {
delay: 100,
});

await userEvent.click(getByTestId('create-connector-flyout-save-btn'));

expect(onClose).not.toHaveBeenCalled();
expect(onConnectorCreated).not.toHaveBeenCalled();
expect(getByTestId('required-field-error-label')).toBeInTheDocument();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('show Required all fields message', async () => {
const { getByTestId } = appMockRenderer.render(
<CreateConnectorFlyout
actionTypeRegistry={actionTypeRegistry}
onClose={onClose}
onConnectorCreated={onConnectorCreated}
onTestConnector={onTestConnector}
/>
);
await act(() => Promise.resolve());
await userEvent.click(getByTestId(`${actionTypeModel.id}-card`));
await waitFor(() => {
expect(getByTestId('test-connector-text-field')).toBeInTheDocument();
});
await userEvent.type(getByTestId('test-connector-text-field'), 'My text field', {
delay: 100,
});
await userEvent.click(getByTestId('create-connector-flyout-save-btn'));
expect(onClose).not.toHaveBeenCalled();
expect(onConnectorCreated).not.toHaveBeenCalled();
expect(getByTestId('required-field-error-label')).toBeInTheDocument();
it('show Required all fields message', async () => {
appMockRenderer.render(
<CreateConnectorFlyout
actionTypeRegistry={actionTypeRegistry}
onClose={onClose}
onConnectorCreated={onConnectorCreated}
onTestConnector={onTestConnector}
/>
);
await userEvent.click(await screen.findByTestId(`${actionTypeModel.id}-card`));
expect(await screen.findByTestId('test-connector-text-field')).toBeInTheDocument();
await userEvent.type(
await screen.findByTestId('test-connector-text-field'),
'My text field',
{
delay: 100,
}
);
await userEvent.click(await screen.findByTestId('create-connector-flyout-save-btn'));
expect(onClose).not.toHaveBeenCalled();
expect(onConnectorCreated).not.toHaveBeenCalled();
expect(await screen.findByTestId('required-field-error-label')).toBeInTheDocument();

The other tests in this file are very outdated(I assume you used those as reference).

screen is preferred over the results of render, findBy* is preferred over getBy*, and await act(() => Promise.resolve()); is not needed(and potentially problematic) when waitFor and findBy should be used to wait for pending promises to be resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also make sure that in this test all fields are required(and the message shows)? And maybe add another where when not all fields are required the message is not displayed? 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion. I will update these tests accordingly.

Copy link
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments.

I also noted that the banner does not show up when editing an existing connector and some fields are missing.

Screenshot 2024-12-04 at 10 54 31

@Samiul-TheSoccerFan
Copy link
Contributor Author

I left some comments.

I also noted that the banner does not show up when editing an existing connector and some fields are missing.

Screenshot 2024-12-04 at 10 54 31

Good catch, looks like edit has its own form.

@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@@ -136,8 +138,19 @@ const ConnectorFormComponent: React.FC<Props> = ({
useEffect(() => {
if (onChange) {
onChange({ isValid: isFormValid, isSubmitted, isSubmitting, submit, preSubmitValidator });
if (isFormValid) {
resetErrorMessage?.();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isFormValid is available "above" in the flyout(/create_connector_flyout/index.tsx) so it is not necessary to pass this function to the connector form. Why not keep all the logic there instead?

@Samiul-TheSoccerFan Samiul-TheSoccerFan requested review from a team as code owners December 10, 2024 05:06
@adcoelho
Copy link
Contributor

The banner at the top of the form is shown after submitting the form, but it goes away after onBlur of the last form field. I would expect it to show and disappear on form submit.

The individual form field error messages should disappear on blur though once that field is valid.

This is minor and could be that others feel differently about the expected UX. If this is a minor change, maybe we do it. But open to other opinions of course.

I wouldn't have noticed if you hadn't mentioned tbh.

I don't mind leaving it as is, specially if it is complicated to change.

@Samiul-TheSoccerFan
Copy link
Contributor Author

@mdefazio We are currently depending on the form to decide if it has any errors. If we want only to handle it based on onSubmit, we need to handle this error message using state management. I will do a timebox refactoring to verify. If it turns out to be a big task, I will merge this one as it is.

@Samiul-TheSoccerFan
Copy link
Contributor Author

@mdefazio @adcoelho made some changes and added a new recording, If the code changes or the current UX is not desired, I can revert the commit and bring it back to the original approved state.

hide-message-when-submitted.mov

@Samiul-TheSoccerFan Samiul-TheSoccerFan requested review from mdefazio and removed request for TattdCodeMonkey December 13, 2024 17:26
@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #97 / Stateful Observability - Deployment-agnostic API integration tests SyntheticsAPITests getSyntheticsMonitors get one monitor should get by id

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.7MB 1.7MB +1.2KB

History

@mdefazio
Copy link
Contributor

made some changes and added a new recording, If the code changes or the current UX is not desired, I can revert the commit and bring it back to the original approved state.

++ This makes sense to me. Helps avoid the form jumping as well. Thank you for taking the time to look into this.

@Samiul-TheSoccerFan Samiul-TheSoccerFan merged commit 07c64de into elastic:main Dec 16, 2024
11 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12356266332

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2024
## Summary

refers
elastic#195048 (comment)

The goal is to display a high-level error message at the top of the
form. We don’t need to show specific details but can provide a general
hint, such as `There are some errors in the form`. When using a screen
reader, this message will indicate that the form submission failed due
to errors.

Each individual field will then be responsible for displaying its own
specific error messages.

This approach ensures compliance with A11Y standards.

### PR Screen Record

#### Add

https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f

#### Edit

https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 07c64de)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2024
## Summary

refers
elastic#195048 (comment)

The goal is to display a high-level error message at the top of the
form. We don’t need to show specific details but can provide a general
hint, such as `There are some errors in the form`. When using a screen
reader, this message will indicate that the form submission failed due
to errors.

Each individual field will then be responsible for displaying its own
specific error messages.

This approach ensures compliance with A11Y standards.

### PR Screen Record

#### Add

https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f

#### Edit

https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 07c64de)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2024
## Summary

refers
elastic#195048 (comment)

The goal is to display a high-level error message at the top of the
form. We don’t need to show specific details but can provide a general
hint, such as `There are some errors in the form`. When using a screen
reader, this message will indicate that the form submission failed due
to errors.

Each individual field will then be responsible for displaying its own
specific error messages.

This approach ensures compliance with A11Y standards.

### PR Screen Record

#### Add

https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f

#### Edit

https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 07c64de)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 16, 2024
# Backport

This will backport the following commits from `main` to `8.17`:
- [[Search][A11Y] Playground -&gt; Open AI form
(#202071)](#202071)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Samiul
Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-16T15:49:37Z","message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","Team:Search","backport:version","a11y","v8.18.0","v8.16.2","v8.17.1"],"title":"[Search][A11Y]
Playground -> Open AI
form","number":202071,"url":"https://github.com/elastic/kibana/pull/202071","mergeCommit":{"message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202071","number":202071,"mergeCommit":{"message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Samiul Monir <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 16, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search][A11Y] Playground -&gt; Open AI form
(#202071)](#202071)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Samiul
Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-16T15:49:37Z","message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","Team:Search","backport:version","a11y","v8.18.0","v8.16.2","v8.17.1"],"title":"[Search][A11Y]
Playground -> Open AI
form","number":202071,"url":"https://github.com/elastic/kibana/pull/202071","mergeCommit":{"message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202071","number":202071,"mergeCommit":{"message":"[Search][A11Y]
Playground -> Open AI form (#202071)\n\n##
Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe
goal is to display a high-level error message at the top of the\r\nform.
We don’t need to show specific details but can provide a
general\r\nhint, such as `There are some errors in the form`. When using
a screen\r\nreader, this message will indicate that the form submission
failed due\r\nto errors.\r\n\r\nEach individual field will then be
responsible for displaying its own\r\nspecific error
messages.\r\n\r\nThis approach ensures compliance with A11Y
standards.\r\n\r\n### PR Screen Record\r\n\r\n####
Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n####
Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Samiul Monir <[email protected]>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Dec 19, 2024
## Summary

refers
elastic#195048 (comment)

The goal is to display a high-level error message at the top of the
form. We don’t need to show specific details but can provide a general
hint, such as `There are some errors in the form`. When using a screen
reader, this message will indicate that the form submission failed due
to errors.

Each individual field will then be responsible for displaying its own
specific error messages.

This approach ensures compliance with A11Y standards.

### PR Screen Record

#### Add


https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f

#### Edit


https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

refers
elastic#195048 (comment)

The goal is to display a high-level error message at the top of the
form. We don’t need to show specific details but can provide a general
hint, such as `There are some errors in the form`. When using a screen
reader, this message will indicate that the form submission failed due
to errors.

Each individual field will then be responsible for displaying its own
specific error messages.

This approach ensures compliance with A11Y standards.

### PR Screen Record

#### Add


https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f

#### Edit


https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility issue backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Search v8.16.2 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants